/**
 * Copyright (C), 2015-2021, XXX有限公司
 * FileName: MapackController
 * Author:   Administrator
 * Date:     2021/8/5 0005 16:39
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package cn.hxlc.tie.demo.modular.material.controller;

import cn.hxlc.tie.demo.modular.material.model.param.MaPackParam;
import cn.hxlc.tie.demo.modular.material.model.result.MaPackResult;
import cn.hxlc.tie.demo.modular.material.service.MaPackService;
import cn.hxlc.tie.libs.scanner.annotation.GetResource;
import cn.hxlc.tie.libs.scanner.stereotype.ApiResource;
import cn.hxlc.tie.model.page.PageResult;
import cn.hxlc.tie.model.web.response.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * 〈一句话功能简述〉<br> 
 * 〈〉
 *
 * @author Administrator
 * @create 2021/8/5 0005
 * @since 1.0.0
 */
@RestController
@ApiResource(name = "物料包装_主表管理", path = "/maPack")
@Api(tags = "物料包装_主表")
public class MapackController {
    @Autowired
    private MaPackService maPackService;

    @GetResource(name = "分页查询列表", path = "/queryListPage", requiredLogin=true, requiredPermission = false)
    @ApiOperation(value = "分页查询列表", response = MaPackResult.class)
    public ResponseData queryListPage(MaPackParam param) {

        PageResult<MaPackResult> pageBySpec = maPackService.findPageBySpec(param);
        return ResponseData.success(pageBySpec);
    }
}
